﻿@model IEnumerable<Anke.SHManage.Model.ViewModel.PersonStorageLinkInfo>

@{
    ViewBag.Title = "PersonStorageNewEdit";
}

<style type="text/css">
    #modifyTb {
        width: 300px;
        margin: 10px auto;
        border-collapse: collapse;
    }

        #modifyTb td, #modifyTb th {
            padding: 4px;
        }
</style>
<script type="text/javascript">
    function PersonStorageSave() {
        $('#formSubmit').form('submit', {
            url: '@Url.Content("~/IM/PersonStorage/PersonStorageSave")',
            onSubmit: function () {
                return $(this).form('validate');
            },
            success: function (data) {
                var jsData = $.parseJSON(data);
                $.handleJsonResult(jsData, function () {
                    $("#grid").datagrid("reload")
                    $('#editWindow').dialog("close");
                });
            }
        });
    }

</script>

@*@using (Html.BeginForm())
    {*@
<form id="formSubmit" method="post">

    <table id="modifyTb">
        <tr>
            <th>
                @*@Html.DisplayNameFor(model => model.Name)*@
            </th>
            <th>
                @*@Html.DisplayNameFor(model => model.IsSelected)*@
            </th>
            <th></th>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td style="width: 50%;text-align:right">
                    @Html.DisplayFor(modelItem => item.Name)
                </td>
                <td style="width: 50%;text-align:left">
                    @*@Html.DisplayFor(modelItem => item.IsSelected)*@
                    @Html.CheckBox(item.ID, item.IsSelected)
                </td>
                <td>
                    @*@Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
                        @Html.ActionLink("Details", "Details", new { id=item.ID }) |
                        @Html.ActionLink("Delete", "Delete", new { id=item.ID })*@
                </td>
            </tr>
        }
        <tr>
            <td colspan="3" align="center">
                @Html.Hidden("UserID", ViewData["UserID"])
            </td>
        </tr>
        <tr>
            <td colspan="3" align="center">
                <a href="#" id="SaveCharge" class="easyui-linkbutton" style="width: 100px; font-size: 16pt;" onclick="PersonStorageSave()">保存</a>
            </td>
        </tr>

    </table>
</form>
